package ${package.Entity};

import java.io.Serializable;
import lombok.AccessLevel;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import java.util.Date;
/**
 * ${table.comment}
 *
 * @author ${author}
 * @since ${date}
 */
@Data
@TableName("${table.name}")
<#if superEntityClass??>
public class ${entity} : ${superEntityClass}<#if activeRecord><${entity}></#if> {
<#elseif activeRecord>
public class ${entity} : Model<${entity}>() {
<#else>
public class ${entity} implements Serializable {
        @Getter(AccessLevel.NONE)
        private static final long serialVersionUID = 1L;
</#if>
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.keyFlag>
        <#assign keyPropertyName="${field.propertyName}"/>
    </#if>

    <#if field.comment!?length gt 0>
        /**
         * ${field.comment}
         */
    </#if>
    <#if field.keyFlag>
        @TableId(value = "`${field.annotationColumnName}`")
    <#-- 主键 -->
        <#if field.keyIdentityFlag>
        <#--    @TableId(value = "${field.annotationColumnName}", type = IdType.AUTO)-->
        <#elseif idType??>
        <#--    @TableId(value = "${field.annotationColumnName}", type = IdType.${idType})-->
        <#elseif field.convert>
        <#--    @TableId("${field.annotationColumnName}")-->
        </#if>
    <#else>
        @TableField("`${field.annotationColumnName}`")
    </#if>
        private ${field.propertyType} ${field.propertyName};
</#list>
}

